package com.kbbywyclient.data.model.base;

import com.kbbywyclient.app.Constants;

/**
 * Created by FHW
 * on 2017/3/23
 */

public class BaseModel<T> {
    private String result;
    private int code;
    private int isOpenRpacket;
    private String msg;
    private T data;

    public int getIsOpenRpacket() {
        return isOpenRpacket;
    }

    public void setIsOpenRpacket(int isOpenRpacket) {
        this.isOpenRpacket = isOpenRpacket;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isSuccessInvalid() {
        return code == Constants.CODE_SUCCESS;
    }
}
